<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>后台管理系统</title>
    <script>
      // 确保页面在加载前就显示加载动画
      document.documentElement.style.backgroundColor = '#f5f7fa'
      document.body ? (document.body.style.backgroundColor = '#f5f7fa') : null
    </script>
    <style>
      html,
      body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        background-color: #f5f7fa;
        font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
        overflow: hidden;
      }

      /* 全屏加载样式 */
      #app-loading {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #f5f7fa;
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: opacity 0.5s ease-out;
      }

      .app-loading-wrap {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
      }

      .app-loading-logo-container {
        position: relative;
        width: 160px;
        height: 160px;
        margin: 0 auto 20px;
        transform-style: preserve-3d;
        animation: logo-container-rotate 6s infinite ease-in-out;
      }

      .app-loading-logo {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        transform-style: preserve-3d;
        backface-visibility: hidden;
      }

      .app-loading-logo-front {
        transform: rotateY(0deg);
      }

      .app-loading-logo-back {
        transform: rotateY(180deg);
      }

      .app-loading-title {
        position: relative;
        font-size: 36px;
        font-weight: 700;
        margin: 30px 0;
        color: transparent;
        letter-spacing: 1px;
        perspective: 1000px;
        display: flex;
        justify-content: center;
      }

      .app-loading-title span {
        opacity: 0;
        display: inline-block;
        position: relative;
        color: rgba(100, 100, 100, 0.4);
        transform-origin: center center;
        animation: text-appear 0.5s forwards;
      }

      .app-loading-title span::before {
        content: attr(data-text);
        position: absolute;
        left: 0;
        top: 0;
        width: 0%;
        height: 100%;
        background: linear-gradient(to right, #409eff, #1e88e5, #0d47a1);
        background-size: 400% 100%;
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        overflow: hidden;
        white-space: nowrap;
        animation: text-gradient-reveal 1s forwards;
      }

      /* 为每个字符设置不同的动画延迟 */
      .app-loading-title span:nth-child(1) {
        animation-delay: 0.1s;
      }
      .app-loading-title span:nth-child(2) {
        animation-delay: 0.2s;
      }
      .app-loading-title span:nth-child(3) {
        animation-delay: 0.3s;
      }
      .app-loading-title span:nth-child(4) {
        animation-delay: 0.4s;
      }
      .app-loading-title span:nth-child(5) {
        animation-delay: 0.5s;
      }
      .app-loading-title span:nth-child(6) {
        animation-delay: 0.6s;
      }
      .app-loading-title span:nth-child(7) {
        animation-delay: 0.7s;
      }
      .app-loading-title span:nth-child(8) {
        animation-delay: 0.8s;
      }
      .app-loading-title span:nth-child(9) {
        animation-delay: 0.9s;
      }
      .app-loading-title span:nth-child(10) {
        animation-delay: 1s;
      }
      .app-loading-title span:nth-child(11) {
        animation-delay: 1.1s;
      }
      .app-loading-title span:nth-child(12) {
        animation-delay: 1.2s;
      }
      .app-loading-title span:nth-child(13) {
        animation-delay: 1.3s;
      }
      .app-loading-title span:nth-child(14) {
        animation-delay: 1.4s;
      }
      .app-loading-title span:nth-child(15) {
        animation-delay: 1.5s;
      }

      /* 为每个字符的渐变色设置不同的动画延迟 */
      .app-loading-title span:nth-child(1)::before {
        animation-delay: 0.1s;
      }
      .app-loading-title span:nth-child(2)::before {
        animation-delay: 0.2s;
      }
      .app-loading-title span:nth-child(3)::before {
        animation-delay: 0.3s;
      }
      .app-loading-title span:nth-child(4)::before {
        animation-delay: 0.4s;
      }
      .app-loading-title span:nth-child(5)::before {
        animation-delay: 0.5s;
      }
      .app-loading-title span:nth-child(6)::before {
        animation-delay: 0.6s;
      }
      .app-loading-title span:nth-child(7)::before {
        animation-delay: 0.7s;
      }
      .app-loading-title span:nth-child(8)::before {
        animation-delay: 0.8s;
      }
      .app-loading-title span:nth-child(9)::before {
        animation-delay: 0.9s;
      }
      .app-loading-title span:nth-child(10)::before {
        animation-delay: 1s;
      }
      .app-loading-title span:nth-child(11)::before {
        animation-delay: 1.1s;
      }
      .app-loading-title span:nth-child(12)::before {
        animation-delay: 1.2s;
      }
      .app-loading-title span:nth-child(13)::before {
        animation-delay: 1.3s;
      }
      .app-loading-title span:nth-child(14)::before {
        animation-delay: 1.4s;
      }
      .app-loading-title span:nth-child(15)::before {
        animation-delay: 1.5s;
      }

      .app-loading-subtitle {
        font-size: 18px;
        font-weight: 500;
        color: rgba(80, 80, 80, 0.7);
        margin-bottom: 40px;
        letter-spacing: 2px;
        text-transform: uppercase;
        opacity: 0;
        animation: fade-in 1s 0.5s forwards;
      }

      .app-loading-progress {
        width: 200px;
        height: 3px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
        margin: 0 auto;
        overflow: hidden;
        position: relative;
      }

      .app-loading-progress-bar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, #409eff, #1e88e5);
        animation: progress-bar 2.5s ease-in-out infinite;
        border-radius: 3px;
      }

      @keyframes logo-container-rotate {
        0%,
        100% {
          transform: rotateY(0deg);
        }
        50% {
          transform: rotateY(180deg);
        }
      }

      @keyframes title-flip {
        0%,
        100% {
          transform: rotateX(0deg);
        }
        50% {
          transform: rotateX(360deg);
        }
      }

      @keyframes text-gradient {
        0% {
          background-position: 0% 50%;
        }
        100% {
          background-position: 100% 50%;
        }
      }

      @keyframes text-gradient-reveal {
        0% {
          width: 0;
          background-position: 0% 50%;
        }
        100% {
          width: 100%;
          background-position: 100% 50%;
        }
      }

      @keyframes text-flip {
        0%,
        100% {
          transform: rotateY(0deg);
        }
        25% {
          transform: rotateY(180deg);
        }
        50% {
          transform: rotateY(360deg);
        }
        75% {
          transform: rotateY(540deg);
        }
      }

      @keyframes text-appear {
        0% {
          opacity: 0;
          transform: translateY(-20px) rotateX(90deg);
        }
        100% {
          opacity: 1;
          transform: translateY(0) rotateX(0deg);
        }
      }

      @keyframes fade-in {
        from {
          opacity: 0;
          transform: translateY(10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      @keyframes progress-bar {
        0% {
          width: 0;
        }
        50% {
          width: 70%;
        }
        100% {
          width: 100%;
        }
      }
    </style>
  </head>
  <body>
    <!-- 全屏加载 -->
    <div id="app-loading">
      <div class="app-loading-wrap">
        <div class="app-loading-title">
          <span data-text="正">正</span>
          <span data-text="在">在</span>
          <span data-text="加">加</span>
          <span data-text="载">载</span>
          <span data-text="中">中</span>
          <span data-text=".">.</span>
          <span data-text=".">.</span>
          <span data-text=".">.</span>
        </div>
        <!--<div class="app-loading-subtitle">正在加载中...</div>-->
        <div class="app-loading-progress">
          <div class="app-loading-progress-bar"></div>
        </div>
      </div>
    </div>

    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
    <script src="./static/config.js"></script>
  </body>
</html>
